﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SSharp.Core.Evaluator;

namespace SSharp.Core.Builtins.Macros {
	/// <summary>
	/// Used to prevent the user from trying to define built-in words like 'lambda' or 'define'.
	/// </summary>
	public class InvalidMacro : Macro {
		private readonly string name;

		public InvalidMacro(string name) {
			this.name = name;
		}

		public object Expand(IList<object> args) {
			throw new InvalidOperationException("Syntax error: " + name + " used as variable");
		}
	}
}
